#include <iostream>
using namespace std;
class Solution {
public:
	bool isPowerOfFour(int num) {
		if (num <= 0)	//the negative number return false
			return false;		
		long long t = 1;
		for(int i=0;i<32;++i)
		{			
			if (num == t)
				return true;
			t*=4;
		}
		return false;		
	}
};
int main()
{
	cout << Solution().isPowerOfFour(-79) << endl;
	return 0;
}